\documentclass[11pt,titlepage,draft]{article}
\usepackage[dvips]{graphicx}
\usepackage{xspace}
\usepackage{multicol}
% \usepackage{fullpage}
\usepackage{listings,verbatim}
\usepackage[pdfborder=0,plainpages=false]{hyperref}
\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}

\lstset{
basicstyle=\small,columns=fullflexible,
language=C,
breaklines=true,
commentstyle=\textit,
showspaces=false,showstringspaces=false,tabsize=4,
% numbers=left, numberstyle=\tiny, numbersep=8pt
}

\newcommand{\gametitle}{\emph{Necropoli: Cities of the Dead}\xspace}
\newcommand{\gt}{\emph{NCD}\xspace}


\setcounter{tocdepth}{2}
\title{\textsc{CS6863: Game Programming} \\ \gametitle \\ HW III}
\author{George Louthan \\ Matt Moyer \\ The University of Tulsa}

\begin{document}
\pagenumbering{alph}
\maketitle
% \onecolumn
\pagenumbering{arabic}
% \section*{Abstract}
\section*{Versions}
0.2 -- rough draft\\
0.1 -- template taken from lecture slides
\setcounter{tocdepth}{3}
\tableofcontents
\newpage
% \twocolumn


\part{Executive Summary} % (``The One Page'')
% Also called the Executive Summary
% Important for the pitch – most execs won’t read beyond the first page
% It is a total encapsulation of your idea
% Often 3 or 4 pages long
% Parts of the One Page

% I don't think this needs to have its own section -- Matt
% \section{Title}
% Think deeply about this it should speak volumes
% Should draw together
%     Main theme
%     Action
%     Character
%     Genre
% \section{Genre}
% FPS
% Third-person action
% Stealth
% RPG
% Simulation
% Survival-Horror
% Platformer
% Sports
% Hybrid
% \section{Version}
% Use version numbers instead of dates
%     Dates make a document look stale
%     Version still allow you to track the document 
% \section{The Big Idea}
% Brief synopsis of the content and game play

\gametitle (\gt) will be an innovative turn-based strategy game based on humanity's survival in the years following an apocalyptic pandemic. The player must direct a band of survivors to find a cure and repopulate the earth. Their efforts will be hampered by the undead victims of the pandemic, who have risen from their graves and are hungry for human brains.

\section{Genre/Category}
% List of a few (successful) games similar to yours
% Single, multi-player, cooperative
% Does it have campaigns
% Don’t say bad things about other games

\gt will be similar to other turn-based strategy games such as the \emph{Civilization} series, % todo: cite
but will differ not only in plot but also in complexity.

Some simplifications over \emph{Civilization} are:
\begin{itemize}
    \item The entire map will be small enough so that it will fit onto one screen with no scrolling.
    \item Rather than explore the world, the player will start with a full map.
    \item Instead of many different city improvements, there will be only a few.
    \item There will be only enemy units, so the player will not command the building and movements of units.
    \item A simple linear science progression will take the place of \emph{Civilization}'s complex research tree.
\end{itemize}

We hope that simplifying these elements of the game will allow us to deliver a polished version of \gt in a reasonable amount of time, and we hope that \gt will retain what we feel is the core gameplay mechanic of turn-based strategy games (\emph{Civilization} in particular) which is the allocation of scarce resources to achieve a long-term goal.


\section{Platforms}
% List of the target platforms with justification
We are targeting the MS Windows, Apple OSX, and Linux platforms in order to support the widest-possible audience. We plan to accomplish this using cross-platform Python libraries. In the course of developing the game, we may cut support for some platforms if we encounter compatibility issues.

\section{License}
% If it is based on a movie or book list them here
% If it is original mention it here and say why it could be a license
Neither the story line nor the game engine and gameplay mechanics of \gt are based on any existing title. The game engine and content will be released under the GNU General Public License v3. % todo: cite GPL

\section{Play Mechanics}
% Talk about how the user is going to interact with the game
% Can include some detail about the users experiences as well
The player will initially control a small band of survivors in an uninfected town. Over the course of many in-game years, the player must direct the allocation of resources between repopulation, defense, mining/scavenging for resources, expansion to neighboring cities, and research to find a cure for the pandemic. The end goal is to survive long enough to find the cure.

\section{Technology}
% Summary of the technology you plan to use
%     Engines
%     Tools
Rather than use Java for \gt as in previous class projects, we plan to use Python with the \emph{Pyglet} and \emph{cocos2d} libraries. This allows us to retain cross-platform compatibility as well as providing many useful framework elements, including:
\begin{itemize}
    \item The ability to easily load and play popular media formats, including MP3, OGG Vorbis, WMA, DivX, MPEG-2, H.264, WMV and Xvid.
    \item Flow control between multiple scenes with animated transitions.
    \item Easy menu/game shell creation.
    \item Hardware acceleration using OpenGL.
    \item A parameterized particle effect system.
\end{itemize}

\section{Target Audience}
% Who’s going to like this game?
% Demographic is ok, but type of gamer is better
\gt is targeted at semi-casual players who seek a relatively quick gaming experience. We expect most games of \gt to last around 10-15 minutes. Additionally, since \gt is turn-based, players can switch easily switch contexts to focus on another application without any detriment to their game. To facilitate this, we will support both full-screen and windowed modes.

% \section{Key Features}
% % Unique selling points
% % Try about six bullet points
% \begin{itemize}
%     \item Engrossing story line
%     \item Cross-platform compatibility (Windows, OSX, Linux)
%     \item Challenging strategic gameplay
%     \item % TODO: find some more
%     \item 
%     \item 
% \end{itemize}
% 
% \section{Marketing Summary}
% % Quick list of why the game will do well
% % Think of hooks for the marketing team
% % Marketing makes or breaks the game
% ``Will humanity survive long enough to find the cure?''

% =============================================================================
% =============================================================================
% =============================================================================
\newpage

\part{Design Document}
% Much more detailed than the one-page
% Also much larger
% Should be considered as an independent document from the one-page
% Parts of the Design Document

\section{Product Overview}
% Reintroduction of the game, but more detailed
% If you have a lead character, fill in some of the details
\gametitle (\gt) will be an innovative turn-based strategy game based on humanity's survival in the years following an apocalyptic pandemic.

The cause of the pandemic is believed to be a militarized strain of the parasitic protozoa \emph{Toxoplasma gondii} which causes loss of higher-order brain functions, causing its victims to become mindless killer zombies.

Over the course of many years, the player must direct a band of survivors to find a cure and repopulate the earth. Their efforts will be hampered by the undead victims of the pandemic, who have risen from their graves and are hungry for human brains.

\section{Game Elements}
% Characters
% Worlds
% Gameplay
% Combat
% Hand to hand
% Weapons
% Movement
% Interactions
% Vehicles
% Story
% Realism versus fantasy
% Controls
\subsection{Map}
The map covers most of a (fictional) continent and shows the locations of 10-15 (fictional) cities. The map also shows major geographic features of the continent, such as forests, mountains, and the surrounding ocean -- though these elements do not factor into gameplay. The map will be divided into a square grid used for pathfinding, but grid lines may not be visually obvious.

\subsection{Cities}
Each city on the map has a name and is either clean or infected. Clean cities are those controlled by the player. Infected cities are those that have succumbed to the pandemic. Initially, only a single city is clean. The status of a city is indicated by an icon on the map.

Each city has a city wall (the continent was at war when the protozoa was released). When a clean city is attacked, the integrity of the city wall is decreased. If the integrity of the wall drops below some minimum value, the city is breeched and all survivors inside are lost to the pandemic.

\subsection{Survivor Population}
Starting with an initial band of a few thousand survivors, the total survivor population will grow over time as survivors procreate. The player has some control over the rate of population grown, which will be discussed later in Section~\ref{allocation}. Survivors also perish if any clean cities are breeched. If the number of survivors drops to zero, the game is over and the player has lost.

\subsection{Resources}
Each city on the map contains a fixed amount of resources. These include raw materials and manufactured goods. The player can use these resources to construct buildings, pay for repairs to the city walls, and capture infected cities. In order to collect resources in a city, survivors must be assigned to scavenge/mine.

\subsection{Research}
The overall goal of \gt is to find a cure for the pandemic by investing in research. The survivor's progress towards a cure is shown as a percentage. The rate of research is determined by the number of survivors in each city dedicated to research as well as the sophistication of the research lab in each city.

When the research progress reaches 100\% and a cure is found, the game is over and the player has won.

\subsection{Buildings}\label{buildings}
Two types of buildings may be constructed/upgraded in each city:
\begin{enumerate}
    \item Turrets/defenses: starting with a basic turret, each level increases the power of the city's defenses which reduces the amount of damage inflicted on the city's wall.
    \item Research labs: starting with no lab, each level increases the productivity of survivors doing research in the city.
\end{enumerate}

Buildings cost resources to build and are destroyed if a city is breeched.

% \section{Player Character}
% % Described in detail along with their journey
% % If there are more than one player controlled character, describe them
% % What do you hope to accomplish in the relationship between the player and character?
% % How will that be achieve?

% \section{Narrative Description (Grabber)}
% Describe a set location as if you were seeing it on the screen
% Pick one that is an attention grabber
% You want to convey the interaction/reaction of the game

\section{Interactions}
% NPCs – communication, controlling
% Worlds – exploration, manipulation
% Weapons - combat
% Equipment - gadgets
\subsection{Allocation of Survivors/Resources}\label{allocation}
Survivors in each city are allocated to one of three tasks:
\begin{enumerate}
    \item Mining/scavenging: collects resources to use for building and repairs.
    \item Research: makes progress towards finding a cure.
    \item Idle: idle survivors procreate at a higher rate than employed survivors.
\end{enumerate}

\subsection{Migration of Population}\label{migration}
The player may choose to move any percentage of survivors from one city to another city controlled by the player, but there is a (small) chance they will be attacked en route, in which case a percentage of the migrants are lost.

\subsection{Capturing an Infected City}\label{capture}
The player may also choose to capture a city infected with the protozoa. The player chooses how many survivors to send from a clean city into an infected city. Capturing a city costs resources and there is a strong chance than some of the survivors will be lost in the attack.

The reward for capturing an infected city is twofold: first, each city has a limited amount of resources, so the player must expand over time in order to survive; second, when a city is captured, there is chance that additional survivors will be found, adding to the total survivor population count.

% \section{Story}
% You provide a beat sheet of the story
% Detail how the story improves the game experience

\section{Interface}
% How the player will interact with the game?
% Is it configurable by the player?
\subsection{Menu}
From this screen, the player can choose whether to play the game in easy, normal, or hard difficulty mode as well as whether to play in full-screen or windowed mode. Later version of the game may also include load and save game functionality.

\subsection{Map Screen}
This shows an overview of the continent, including the locations of all cities and roaming hordes. Each city is represented by a small icon which also shows the city's wall integrity. Clicking on a city changes to the city detail screen for that city.

The map screen also shows the current time (in months), as well as the total survivor count and the research progress. Buttons allow the player to finish their turn or to skip ahead multiple turns.

\subsection{City Detail Screen}
The city detail screen shows the total population of the city as well as the number of survivors allocated to each possible task (see Section~\ref{allocation}). Next to each task is a set of $+/-$ buttons which the player can use to change the number of survivors allocated to that task.

The player also has the option to build/upgrade buildings (see Section~\ref{buildings}) using a pair of buttons.

The city detail screen also has a button leading to the population movement screen.

\subsection{Population Movement Screen}
Coming from the city detail screen, this screen allows survivors to be sent to another city. If the second city is a clean city, the move will be a migration with a small chance of attack en route, but if the second city is an infected city, the move will be an capture (as discussed in Sections~\ref{migration} and \ref{capture}).

\section{Enemies}
% Enemies
% Environment
% Scripted Events
% Puzzles
There is only one type of enemy: the roaming zombie horde. The main reason for this is our limited art resources. These hordes originate from one of two sources:
\begin{enumerate}
    \item Hordes spawn from infected cities frequently.
    \item Off-screen hordes spawn at a less frequent rate.
\end{enumerate}

Having hordes spawn from infected cities gives the player an incentive to capture those cities.

Roaming hordes will wander randomly (avoiding obstacles such as oceans and mountains) until they are within a certain minimum range of a clean city, at which point they will approach the city (again avoiding obstacles). When a horde is adjacent to a clean city, it will attack the city walls, reducing their integrity.

% \section{Level Walkthrough}
% describe one level of the game

\section{Intro Cinematics}
% describe the intro cinematics that leads to the first part of the game
After the player selects a difficulty and starts the game, there will be a short text-based introduction (1 paragraph) which describes the back story.

% \section{Game Shell}
% Options – list options available to the player
% Load/Save – Details the details of saving and loading
% Load and save functionality will not be present in the initial version of the game.

\section{Controller Configuration}
% Use your best guess of the button assignments
% If you can’t map it, you can’t play it
\gt should be entirely mouse-based. The player selects actions using buttons and menus as described in previous sections.

% \section{Character Actions} (List of actions the playable character can perform)
% Movement – how to control movement
% Using Objects – how you interact with objects
% Character Interactions – how you interact with other characters
% Combat Description – the elements and actions of combat
% H2H – the list of fighting moves
% Weapons – main weapons you can use
% Other items you control – like vehicles
% 
% \section{Exploration}
% Linear vs free-roaming
% Advancing through levels
% Advancing through the story
% Manipulation
% Using/taking objects
% Setting off triggers

% \section{Interface}
% % Components
% % Inventory
% % Items
% % Weapons

% \section{Direct Effects on Character}
% % Health
% % Damage
% % Armor
% % Replenishing health and armor
% % Character Death
% % Power-up

\section{Levels}
% Brief Descriptions
% Key Enemies, NPCs per level
% Story elements
Later versions of \gt may feature multiple stages of increasing difficulty with each stage representing a different continent. However, the initial version of the game will have only a single stage.

\section{Art} % if at all possible
% Character designs
% Level Maps
% Weapons/items concept art
% World concept art
% Sample textures
% Sample Interface
% Sample front end
% Cinematics storyboards
Visual art resources that need to be created include:
\begin{itemize}
    \item Map background
    \begin{itemize}
        \item Grass
        \item Water
        \item Mountain
        \item Roads
    \end{itemize}
    \item Zombie horde sprite
    \item City sprites
    \begin{itemize}
        \item Clean and infected versions
    \end{itemize}
    \item Interface elements
    \begin{itemize}
        \item Button textures
        \item Progress bar textures
        \item Menu backgrounds
    \end{itemize}
\end{itemize}
Map files will also have to be created to specify solid grid spaces as well as city locations and names.

\section{Cut-scenes and Story Synopsis}
% In-game (game engine rendered)
% Possible pre-renders
% Incidental dialog
% Event triggers that are story dependent
A simple message display system will be used to give contextual help and status messages.

\section{Sound}
% Character Sounds
% Enemy/NPC sounds
% Dolby digital 5.1
% Music
% Streaming audio with the game
% Using audio to set the mood
% Licensed versus original music
% Vocal recordings
We plan to use freely-available Creative Commons licensed work as thematic background music. Sound effects will include attacks, zombie moans/groans, and game win/loss effects. If we are able to find these as freely-available under Creative Commons license, we will use them. Otherwise, we will record them ourselves.

\section{Development Summary}
% Preliminary schedule
% Budget
% Engineering acquisitions and schedules
% Personnel bios and resumes
% Risk Q and As
Our preliminary schedule is to initially focus on creating our art assets, then work on loading and displaying the map. Then we will split up the work into zombie pathfinding and state updates. The next step will be to create the city detail screen and implement population movement. The last stage of the project will be devoted to testing and balancing the game by tweaking some of the many parameters.

Despite the complexity of the interface, we foresee no major hurdles and believe we can finish in time.

% \section{Localization}
% Overview
% Languages
% Text
% Speech

\section{Conclusion}
% One last chance to pitch the game and describe why it must be made
\gametitle represents our best try at designing an interesting and exciting turn-based strategy game using the tools and techniques from CS6863. Once implemented, we believe that \gt will engage players with challenging gameplay and an engrossing story line.

% Conclusions
%     Countless games die during the formulation phase
%     Many more die during the pitch
%     Formulating a good high-level design document will help 
%         You to clarify your ideas
%         Your readers to share your enthusiasm
\end{document}